package com.hit.aircraftwar.aircraft;


import com.hit.aircraftwar.activity.MainActivity;
import com.hit.aircraftwar.basic.BombAffectedObject;
import com.hit.aircraftwar.bullet.AbstractBullet;
import com.hit.aircraftwar.strategy.ShootStrategy;

import java.util.LinkedList;
import java.util.List;

/**
 * 普通敌机
 * 不可射击
 *
 * @author hitsz
 */
public class MobEnemy extends AbstractAircraft implements BombAffectedObject {

    public MobEnemy(int locationX, int locationY, int speedX, int speedY, int hp, ShootStrategy shootStrategy, int direction, int power, int shootNum) {
        super(locationX, locationY, speedX, speedY, hp, shootStrategy, direction, power, shootNum);
    }

    @Override
    public void forward() {
        super.forward();
        // 判定 y 轴向下飞行出界
        if (locationY >= MainActivity.height) {
            vanish();
        }
    }


    @Override
    public List<AbstractBullet> shoot(AbstractAircraft abstractAircraft) {
        return new LinkedList<>();
    }

    @Override
    public void bombed() {
        this.vanish();
    }
}
